import request from '../utils/request'
import config from '../config'

// 分类列表接口
export function getCategoryList() {
  return request.get('/category/getCategoryList')
}

// 查询单个分类接口
export function getCategory(params) {
  console.log(params);
  
  return request.get('/category/getCategory', { params })
}

// 新增分类接口
export function addCategory(data) {
  return request.post('/category/addCategory', data)
}

// 修改分类接口
export function editCategory(data) {
  return request.post('/category/updateCategory', data)
}

// 删除分类接口
export function delCategory(data) {  
  return request.get('/category/deleteCategory',  {
    params: data})
}
